import Layout from "@/layout";
import emptyLayout from "@/layout/emptyRouter.vue";

export default {
    path: "/exam",
    meta: {
        title: "题库管理",
        roles: ["exam"],
        icon: "el-icon-s-grid"
    },
    component: Layout,
    redirect: "/exam",
    name: "Exam",
    children: [
        {
            path: "base",
            component: emptyLayout,
            meta: {
                title: "基础设置",
                roles: ["exam:base"],
                icon: "el-icon-setting"

            },
            children: [
                {
                    path: "industry",
                    meta: {
                        title: "行业管理",
                        roles: ["exam:base:industry"],
                        icon: "el-icon-files"
                    },
                    component: () => import("@/views/models/exam/base/industry.vue"),
                    name: "Industry"
                },
                {
                    path: "exam",
                    meta: {
                        title: "考试管理",
                        roles: ["exam:base:exam"],
                        icon: "el-icon-receiving"
                    },
                    component: () => import("@/views/models/exam/base/exam.vue"),
                    name: "Exam"
                },
                {
                    path: "category",
                    meta: {
                        title: "科目管理",
                        roles: ["exam:base:category"],
                        icon: "el-icon-s-cooperation"
                    },
                    component: () => import("@/views/models/exam/base/category.vue"),
                    name: "Category"
                },
                {
                    path: "column",
                    meta: {
                        title: "栏目管理",
                        roles: ["exam:base:column"],
                        icon: "el-icon-s-operation"
                    },
                    component: () => import("@/views/models/exam/base/column.vue"),
                    name: "Column"
                },
            ]
        },

        {
            path: "questionBase",
            component: emptyLayout,
            meta: {
                title: "试题管理",
                roles: ["exam:question"],
                icon: "el-icon-question"
            },
            children: [
                {
                    path: "question",
                    meta: {
                        title: "试题列表",
                        roles: ["exam:question:list"],
                        icon: "el-icon-tickets"
                    },
                    component: () =>
                        import(
                            "@/views/models/exam/questionBase/question/index.vue"
                            ),
                    name: "QuestionIndex"
                },
                {
                    path: "addQuestion",
                    meta: {
                        title: "添加试题",
                        roles: ["exam:question:add"],
                        icon: "el-icon-document-add"
                    },
                    component: () =>
                        import("@/views/models/exam/questionBase/question/add.vue"),
                    name: "AddQuestionIndex"
                },
                {
                    path: "editQuestion",
                    meta: {
                        title: "编辑试卷试题",
                        roles: ["exam:question:edit"]
                    },
                    component: () =>
                        import("@/views/models/exam/questionBase/question/edit.vue"),
                    name: "EditQuestionIndex",
                    hidden: true
                },
                {
                    path: "seeQuestion",
                    meta: {
                        title: "查看试卷试题",
                        roles: ["exam:question:see"]
                    },
                    component: () =>
                        import("@/views/models/exam/questionBase/question/see.vue"),
                    name: "SeeQuestionIndex",
                    hidden: true
                },
                /*{
                    path: "question-school",
                    meta: {
                        title: "机构试题列表",
                        roles: ["exam:question:list-school"]
                    },
                    component: () =>
                        import(
                            "@/views/models/exam/questionBase/question/index2.vue"
                        ),
                    name: "QuestionIndex2"
                },*/
                {
                    path: "question-type",
                    meta: {
                        title: "题型管理",
                        roles: ["exam:question:questionType"],
                        icon: "el-icon-c-scale-to-original"
                    },
                    component: () =>
                        import(
                            "@/views/models/exam/questionBase/question-type/index.vue"
                            ),
                    name: "QuestionTypeIndex"
                }, {
                    path: "question-correction",
                    meta: {
                        title: "纠错管理",
                        roles: ["exam:question:correction"],
                        icon: "el-icon-edit"
                    },
                    component: () =>
                        import(
                            "@/views/models/exam/questionBase/question-correction"
                            ),

                    name: "QuestionCorrectionIndex"
                },
                {
                    path: "correction-details",
                    meta: {
                        title: "纠错详情",
                        roles: ["exam:question:correction:details"]
                    },
                    component: () => import("@/views/models/exam/questionBase/question-correction/details.vue"),
                    hidden: true,
                    name: "QuestionCorrectionDetails"
                },
                {
                    path: "question-note",
                    meta: {
                        title: "笔记管理",
                        roles: ["exam:question:note"],
                        icon: "el-icon-edit"
                    },
                    component: () =>
                        import(
                            "@/views/models/exam/questionBase/question-note"
                            ),
                    name: "QuestionNoteIndex"
                },
                /* {
                     path: "import-question",
                     meta: {
                         title: "导入试题",
                         roles: ["exam:question:import"]
                     },
                     component: () =>
                         import(
                             "@/views/models/exam/questionBase/question/importQuestion.vue"
                         ),
                     name: "ImportQuestion"
                 },*/
                {
                    path: "edit-question",
                    meta: {
                        title: "试题编辑",
                        roles: ["exam:question:edit"]
                    },
                    hidden: true,
                    component: () =>
                        import(
                            "@/views/models/exam/questionBase/question/editQuestion.vue"
                            ),
                    name: "EditQuestion"
                }
            ]
        },
        /*        {
                    path: "exam-manager",
                    meta: {
                        title: "考试管理",
                        roles: ["exam:list"]
                    },
                    component: emptyLayout,
                    name: "ExamList",
                    children: [
                        {
                            path: "self-exam",
                            meta: {
                                title: "自有考试管理",
                                roles: ["exam:self:list"]
                            },
                            name: "SelfExam",
                            component: emptyLayout,
                            children: [
                                {
                                    path: "self-exam-work",
                                    meta: {
                                        title: "自有作业列表",
                                        roles: ["exam:self:work:list"]
                                    },
                                    component: () =>
                                        import(
                                            "@/views/models/exam/self-exam-work.vue"
                                        ),
                                    name: "SelfExamWork"
                                },
                                {
                                    path: "self-exam-final",
                                    meta: {
                                        title: "自有期末考试列表",
                                        roles: ["exam:self:final:list"]
                                    },
                                    component: () =>
                                        import(
                                            "@/views/models/exam/self-exam-final.vue"
                                        ),
                                    name: "SelfExamFinal"
                                },
                                {
                                    path: "self-exam-normal",
                                    meta: {
                                        title: "自有公开考试列表",
                                        roles: ["exam:self:normal:list"]
                                    },
                                    component: () =>
                                        import(
                                            "@/views/models/exam/self-exam-normal.vue"
                                        ),
                                    name: "SelfExamNormal"
                                }
                            ]
                        },
                        {
                            path: "group-exam",
                            meta: {
                                title: "机构考试管理",
                                roles: ["exam:group:list"]
                            },
                            name: "GroupExam",
                            component: emptyLayout,
                            children: [
                                {
                                    path: "group-exam-work",
                                    meta: {
                                        title: "机构作业列表",
                                        roles: ["exam:group:work:list"]
                                    },
                                    component: () =>
                                        import(
                                            "@/views/models/exam/group-exam-work.vue"
                                        ),
                                    name: "GroupExamWork"
                                },
                                {
                                    path: "group-exam-final",
                                    meta: {
                                        title: "机构期末考试列表",
                                        roles: ["exam:group:final:list"]
                                    },
                                    component: () =>
                                        import(
                                            "@/views/models/exam/group-exam-final.vue"
                                        ),
                                    name: "GroupExamFinal"
                                },
                                {
                                    path: "group-exam-normal",
                                    meta: {
                                        title: "机构公开考试列表",
                                        roles: ["exam:group:normal:list"]
                                    },
                                    component: () =>
                                        import(
                                            "@/views/models/exam/group-exam-normal.vue"
                                        ),
                                    name: "GroupExamNormal"
                                }
                            ]
                        },
                        {
                            path: "add-exam-work",
                            meta: {
                                title: "作业",
                                roles: ["exam:self:work:add"]
                            },
                            component: () =>
                                import("@/views/models/exam/add-exam-work.vue"),
                            name: "AddExamWork",
                            hidden: true
                        },
                        {
                            path: "add-exam-final",
                            meta: {
                                title: "期末考试",
                                roles: ["exam:self:final:add"]
                            },
                            component: () =>
                                import("@/views/models/exam/add-exam-final.vue"),
                            name: "AddExamFinal",
                            hidden: true
                        },
                        {
                            path: "add-exam-normal",
                            meta: {
                                title: "公开考试",
                                roles: ["exam:self:normal:add"]
                            },
                            component: () =>
                                import("@/views/models/exam/add-exam-normal.vue"),
                            name: "AddExamNormal",
                            hidden: true
                        }
                    ]
                },*/

        {
            path: "examPaperRe",
            meta: {
                title: "考试试卷关联管理",
                roles: ["exam:re"]
            },
            component: () =>
                import("@/views/models/exam/examPaperRe/index.vue"),
            name: "ExamPaperRe",
            hidden: true
        },
        /*{
            path: "paperRule",
            meta: {
                title: "组卷规则管理",
                roles: ["exam:rule"]
            },
            component: emptyLayout,
            name: "Rule",
            children: [
                {
                    path: "self-paperRule",
                    meta: {
                        title: "自有规则列表",
                        roles: ["rule:self:list"]
                    },
                    component: () =>
                        import("@/views/models/exam/paperRule/self-rule.vue"),
                    name: "SelfPaperRule"
                },
                {
                    path: "group-paperRule",
                    meta: {
                        title: "机构规则列表",
                        roles: ["rule:group:list"]
                    },
                    component: () =>
                        import("@/views/models/exam/paperRule/group-rule.vue"),
                    name: "GroupPaperRule"
                }
            ]
        },*/
        {
            path: "addRule",
            meta: {
                title: "添加组卷规则",
                roles: ["exam:rule:add"]
            },
            component: () =>
                import("@/views/models/exam/paperRule/addRule.vue"),
            name: "AddRule",
            hidden: true
        },
        {
            path: "groupAddRule",
            meta: {
                title: "查看组卷规则",
                roles: ["exam:group:rule:look"]
            },
            component: () =>
                import("@/views/models/exam/paperRule/groupAddRule.vue"),
            name: "GroupAddRule",
            hidden: true
        },
        {
            path: "paperRecord",
            meta: {
                title: "考试记录",
                roles: ["exam:record:list"]
            },
            component: () =>
                import("@/views/models/exam/paperRecord/index.vue"),
            name: "PaperRecord",
            hidden: true
        },
        {
            path: "paper",
            meta: {
                title: "试卷管理",
                roles: ["exam:paper"],
                icon: "el-icon-document-remove"
            },
            component: emptyLayout,
            children: [
                {
                    path: "paper",
                    meta: {
                        title: "试卷列表",
                        roles: ["exam:paper:list"],
                        icon: "el-icon-document-copy"
                    },
                    component: () =>
                        import(
                            "@/views/models/exam/paper/index.vue"
                            ),
                    name: "PaperIndex"
                },
                {
                    path: "rule",
                    meta: {
                        title: "考试规则",
                        roles: ["exam:paper:rule"],
                        icon: "el-icon-reading"
                    },
                    component: () =>
                        import(
                            "@/views/models/exam/paper/rule.vue"
                            ),
                    name: "PaperRule"
                },
                /*  {
                    path: "paper",
                    meta: {
                        title: "自有试卷管理",
                        roles: ["exam:self:paper"]
                    },
                    component: emptyLayout,
                    children: [
                        {
                            path: "self-chapterText",
                            meta: {
                                title: "自有作业试卷",
                                roles: ["exam:self:paper:chapterText"]
                            },
                            component: () =>
                                import(
                                    "@/views/models/exam/paper/chapterText.vue"
                                ),
                            name: "ChapterText"
                        },
                        {
                            path: "self-finalExam",
                            meta: {
                                title: "自有期末考试试卷",
                                roles: ["exam:self:paper:finalExam"]
                            },
                            component: () =>
                                import(
                                    "@/views/models/exam/paper/finalExam.vue"
                                ),
                            name: "FinalExam"
                        },
                        {
                            path: "self-normalExam",
                            meta: {
                                title: "自有公开考试试卷",
                                roles: ["exam:self:paper:normalExam"]
                            },
                            component: () =>
                                import(
                                    "@/views/models/exam/paper/normalExam.vue"
                                ),
                            name: "NormalExam"
                        },
                        {
                            path: "import-paper",
                            meta: {
                                title: "导入试卷",
                                roles: ["exam:self:paper:import"]
                            },
                            component: () =>
                                import(
                                    "@/views/models/exam/paper/importPaper.vue"
                                ),
                            name: "ImportPaper"
                        }
                    ]
                },
                {
                    path: "group-paper",
                    meta: {
                        title: "机构试卷管理",
                        roles: ["exam:group:paper"]
                    },
                    component: emptyLayout,
                    children: [
                        {
                            path: "group-chapterText",
                            meta: {
                                title: "机构作业试卷",
                                roles: ["exam:group:paper:chapterText"]
                            },
                            component: () =>
                                import(
                                    "@/views/models/exam/paper/groupChapterText.vue"
                                ),
                            name: "GroupChapterText"
                        },
                        {
                            path: "group-finalExam",
                            meta: {
                                title: "机构期末考试试卷",
                                roles: ["exam:group:paper:finalExam"]
                            },
                            component: () =>
                                import(
                                    "@/views/models/exam/paper/groupFinalExam.vue"
                                ),
                            name: "GroupFinalExam"
                        },
                        {
                            path: "group-normalExam",
                            meta: {
                                title: "机构公开考试试卷",
                                roles: ["exam:group:paper:normalExam"]
                            },
                            component: () =>
                                import(
                                    "@/views/models/exam/paper/groupNormalExam.vue"
                                ),
                            name: "GroupNormalExam"
                        }
                    ]
                }*/
            ]
        },
        {
            path: "addPaper",
            meta: {
                title: "添加试卷",
                roles: ["exam:paper:add"]
            },
            component: () => import("@/views/models/exam/paper/addPaper.vue"),
            name: "AddPaper",
            hidden: true
        },
        {
            path: "examChapters",
            meta: {
                title: "章节管理",
                roles: ["exam:chapters"],
                icon: "el-icon-document"
            },
            component: () =>
                import("@/views/models/exam/examChapters/indexTree.vue"),
            name: "ExamChapters"
        },
        {
            path: "examPracticeQuestion",
            meta: {
                title: "章节练习",
                roles: ["exam:chapters:question"]
            },
            component: () =>
                import(
                    "@/views/models/exam/examChapters/examPracticeQuestion.vue"
                    ),
            name: "ExamPracticeQuestion",
            hidden: true
        },
        {
            path: "import-examChapter",
            meta: {
                title: "导入章节",
                roles: ["exam:chapters:import"]
            },
            component: () =>
                import(
                    "@/views/models/exam/examChapters/importExamChapter.vue"
                    ),
            name: "ImportExamChapter",
            hidden: true
        },
        // {
        //     path: "column-base",
        //     component: emptyLayout,
        //     meta: {
        //         title: "栏目管理",
        //         roles: ["exam:column"]
        //     },
        //     children: [
        //         {
        //             path: "column-list",
        //             meta: {
        //                 title: "栏目列表",
        //                 roles: ["exam:column:list"]
        //             },
        //             component: () => import("@/views/models/column/index.vue"),
        //             name: "ColumnIndex"
        //         },
        //         {
        //             path: "column-add",
        //             meta: {
        //                 title: "添加栏目",
        //                 roles: ["exam:column:add"]
        //             },
        //             component: () => import("@/views/models/column/add.vue"),
        //             name: "ColumnAdd",
        //             hidden: true
        //         }
        //     ]
        // }
    ]
};
